home *** CD-ROM | disk | FTP | other *** search
- GEM++ - C++ LIBRARIES FOR GEM/AES/VDI
-
-
-
- NAME
- GEMrsc - RSC file loader.
-
- DESCRIPTION
- RSC files should always be used - they allow easy translation of
- your program into other languages, and user configuration of form
- shape and colour. No language-specific text needs to appear in
- your program.
-
- Normally, GEM only allows one RSC file to be loaded at any time.
- Also, each RSC file is limited to 64K in size. This class allows
- any number of RSC files to be loaded, although each is still
- limited to 64K since RSC editors cannot produce large resources.
-
- CONSTRUCTORS
- GEMrsc(const char *filename, int rscw, int rsch)
- Create a GEMrsc by loading the given filename. The GEMrsc can
- then be used when creating forms, alerts, etc. The objects in
- the forms of the resource are proportionally scaled as if the
- RSC file was editted while the character size was the given
- width and height. For example, if the RSC was created while
- in STHigh (or any TT mode) resolution, use rscw=8, rsch=16.
- Note that trees containing TITLE objects are assumed to be
- menus, and are repositioned using the standard GEM rescaler.
-
- GEMrsc(const char *filename)
- Create a GEMrsc by loading the given filename using the standard
- GEM rsrc_load() function. Only ONE GEMrsc created in this way
- may exist at any one time. Also, the standard object repositioning
- and resizing technique is used... yuck.
-
- METHODS
- GEMrawobject* Tree(int RSCindex)
- Return a pointer to the given tree in the GEMrsc. This is used
- by classes such as GEMform.
-
- char* String(int RSCindex)
- Return a pointer to the given string in the GEMrsc. This is used
- by classes such as GEMalert.
-
- int operator!()
- Returns 1 (TRUE) if the GEMrsc failed to be created (because the
- RSC file could not be loaded).
-
- void ChangeColours(int changer(int in_form, int from))
- Pass every colour in the GEMrsc to the given function and replace
- it with the returned value. The RSCindex of the form in which
- the colour occurs is also passed, so the function may react
- differently for the same colour in different forms.
-
- EXAMPLE
- GEMrsc rsc("foo.rsc");
- if (!rsc) {
- GEMalert oh_dear("Cannot load file:|foo.rsc","quit|ciao");
- oh_dear.Alert(0);
- } else {
- ...
- }
-
- SEE ALSO
- GEMform, GEMalert, GEMformwindow, GEMmenu
-
- BUGS
- Bugs in GEM++ should be reported to warwick@cs.uq.oz.au
-
- AUTHOR
- Warwick Allison, 1993.
- warwick@cs.uq.oz.au
-
- COPYING
- This functionality is part of the GEM++ library,
- and is Copyright 1993 by Warwick W. Allison.
-
- GEM++ is free and protected under the GNU Library General Public
- License.
-
- You are free to copy and modify these sources, provided you
- acknowledge the origin by retaining this notice, and adhere to
- the conditions described in the GNU LGPL.
-